<template>
	<view>
		<image src="../../../客服微信.jpg"></image>
	</view>
</template>

<script>
	import {orderShip,orderInfo} from '@/common/http.api.js'
	export default {
		data() {
			return {
				id:null,
				orderGoodId:'',
				orderId:'',
				moneyText:'',
				aftermarkettypeText:'',
				exchangeText:'',
				exchangetipText:'',
				refundText:'',
				refundtipText:'',
				refundsText:'',
				aftermarketgoodsText:'',
				refundstipText:'',
				orderData:{
					goodInfo:{
						thumbnail:null,
					},
					orderGoodInfo:{
						goodQuantity:null,
					}
				},
			};
		},
		onShow() {
		  this.refresh();	
		},
		async onLoad(e){
			this.id=e.id;
			await this.getOrderInfo();
		},
		methods:{
			refresh(){
				this.moneyText = this.$t('common.money.text');
				this.aftermarkettypeText = this.$t('sale.aftermarkettype.text');
				this.exchangeText = this.$t('sale.exchange.text');
				this.exchangetipText = this.$t('sale.exchangetip.text');
				this.refundText = this.$t('sale.refund.text');
				this.refundtipText = this.$t('sale.refundtip.text');
				this.refundsText = this.$t('sale.refunds.text');
				this.aftermarketgoodsText = this.$t('sale.aftermarketgoods.text');
				this.refundstipText = this.$t('sale.refundstip.text');
			},
			getOrderInfo(){
				orderInfo({params:{id:this.id}}).then(res => {
					if (res.code === 0) {
						this.orderData = res.data;
						this.orderId = this.orderData.id;
						this.orderGoodId = this.orderData.orderGoodInfo.id;
					} else {
						uni.hideLoading();
						this.$refs.uToast.show({
							message: res.msg,
							type: 'error',
						})
					}
				});
			},
		}
	}
</script>

<style lang="scss">
page{
	width: 100%;
	height: 100%;
}
.goshop-sale-container{
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	.goshop-sale-head-wrap{
		width: 100%;
		.goshop-sale-head-box{
			display: flex;
			flex-direction: column;
			padding: 20rpx;
			.goshop-sale-head{
				background-color: $goshop-color-auxiliary-one;
				border-radius: 20rpx;
				padding: 20rpx;
				.goshop-sale-head-top{
					margin-bottom: 20rpx;
				}
				.goshop-sale-head-bottom{
					display: flex;
					justify-content: space-between;
					.goshop-sale-head-bottom-left{
						margin-right: 20rpx;
					}
					.goshop-sale-head-bottom-center{
						flex: 3;
					}
					.goshop-sale-head-bottom-right{
						display: flex;
						align-items: center;
						flex-direction: column;
						justify-content: center;
					}
				}
			}
		}
	}
	.goshop-sale-body-wrap{
		width: 100%;
		.goshop-sale-body-box{
			padding:0 20rpx;
			.goshop-sale-body{
				padding: 20rpx;
				border-radius: 20rpx;
				background-color: $goshop-color-auxiliary-one;
				.goshop-sale-body-item{
					display: flex;
					justify-content: space-between;
					align-items: center;
					.goshop-sale-body-item-left{
						display: flex;
						justify-content: center;
						align-items: center;
					}
					.goshop-sale-body-item-center{
						flex: 2;
						padding: 15rpx;
					}
					.goshop-sale-body-item-right{
						display: flex;
						justify-content: center;
						align-items: center;
					}
				}
			}
		}
	}
}
</style>
